package com.recipedb.recipedb.repository;

import com.recipedb.recipedb.entity.RecipeDraft;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;//小侯

@Repository
public interface RecipeDraftRepository extends JpaRepository<RecipeDraft, Long> {
    // 根据用户ID查询其所有草稿
    List<RecipeDraft> findByUserIdOrderByCreatedAtDesc(Long userId);
}